/* Copyright (c) 2009 SpringShowcase, Inc.
 * All right reserved.
 * http://code.google.com/p/springshowcase/
 * This software is the confidential and proprietary information of BeyondWeb
 * , Inc. You shall not disclose such Confidential Information and
 * shall use it only in accordance with the terms of the license agreement
 * you entered into with BeyondWeb.
 *
 * Revision History
 * Author              Date             Description
 * ------------------   --------------    ------------------
 *  kwondohee           2010. 4. 8.        
 */
package org.springshowcase.rpc;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

// TODO: Auto-generated Javadoc
/**
 * The Class DwrServiceImpl.
 *
 * @author kwondohee
 */
public class DwrServiceImpl implements DwrService {
	// ---------------------------------------------------------------------
	// Class Variable Declaration
	// ---------------------------------------------------------------------
	/** The Constant logger. */
	private static final Logger logger = LoggerFactory
			.getLogger(DwrServiceImpl.class);
	// ---------------------------------------------------------------------
	// Constructor Method Declaration
	// ---------------------------------------------------------------------
	/**
	 * Instantiates a new dwr service impl.
	 */
	public DwrServiceImpl(){}
	// ---------------------------------------------------------------------
	// DI Method (setter,getter) Declaration
	// ---------------------------------------------------------------------
	/** The dwr repository. */
	@Autowired
	DwrRepository dwrRepository;
	// ---------------------------------------------------------------------
	// this Method (public/private) Declaration
	// ---------------------------------------------------------------------
	// ---------------------------------------------------------------------
	// interface implement Method (public/private) Declaration
	// ---------------------------------------------------------------------
	/* (non-Javadoc)
	 * @see org.springshowcase.dwr.DwrService#createUser(org.springshowcase.dwr.User)
	 */
	@Override
	public void createUser(User user) {
		dwrRepository.insertUser(user);
	}
	
	/* (non-Javadoc)
	 * @see org.springshowcase.dwr.DwrService#findUser(org.springshowcase.dwr.User)
	 */
	@Override
	public User findUser(User user) {
		return dwrRepository.selectUser(user);
	}
	
	/* (non-Javadoc)
	 * @see org.springshowcase.dwr.DwrService#findUserList()
	 */
	@Override
	public List<User> findUserList() {
		return dwrRepository.selectUserList();
	}
	// ---------------------------------------------------------------------
	// abstract implement Method (public/private) Declaration
	// ---------------------------------------------------------------------
	// ---------------------------------------------------------------------
	// abstract Method (public/private) Declaration
	// ---------------------------------------------------------------------
}
